Skip to content

Unified: Local scoping followups - #22237

Merged
asgerf merged 11 commits into
github:mainfrom
asgerf:unified/local-scoping-followups
Jul 30, 2026
Merged

Unified: Local scoping followups#22237
asgerf merged 11 commits into
github:mainfrom
asgerf:unified/local-scoping-followups

Conversation

@asgerf

@asgerf asgerf commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Follows up on some comments @hvitved left on this PR, which was merged to unblock @tausbn.

Also contains a fix to the AST mapping since one of the comments pointed to a bug whose root cause was in the AST mapping.

@asgerf asgerf added the no-change-note-required This PR does not need a change note label Jul 27, 2026
@asgerf
asgerf marked this pull request as ready for review July 28, 2026 07:17
@asgerf
asgerf requested a review from a team as a code owner July 28, 2026 07:17
Copilot AI review requested due to automatic review settings July 28, 2026 07:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Swift local-scoping follow-ups and preserves switch-case where clauses in the unified AST.

Changes:

  • Extends variable-shadowing and guarded-case tests.
  • Maps switch where clauses to case guards.
  • Removes a redundant name-binding override.
Show a summary per file
File Description
unified/ql/test/library-tests/variables/test.swift Expands local-scoping coverage.
unified/ql/lib/codeql/unified/internal/Variables.qll Removes the redundant lookup override.
unified/extractor/tests/corpus/swift/control-flow/switch-case-where-clauses.swift Adds switch-case fixtures.
unified/extractor/tests/corpus/swift/control-flow/switch-case-where-clauses.output Records expected AST output.
unified/extractor/src/languages/swift/swift.rs Maps case guards into the unified AST.

Review details

  • Files reviewed: 5/5 changed files
  • Comments generated: 2
  • Review effort level: Medium

Comment thread unified/extractor/src/languages/swift/swift.rs Outdated
Comment thread unified/extractor/src/languages/swift/swift.rs Outdated
@asgerf
asgerf force-pushed the unified/local-scoping-followups branch from 02af38b to 91c2d72 Compare July 29, 2026 11:46
Comment thread unified/ql/lib/codeql/unified/Ast.qll Dismissed

@tausbn tausbn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! 👍

@asgerf
asgerf merged commit 37cc439 into github:main Jul 30, 2026
15 checks passed
@hvitved

hvitved commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Thanks for addressing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-change-note-required This PR does not need a change note

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants